Page({
  data: {
    user: null, // 这里应该从全局状态管理中获取用户信
  },
  onLoad() {
    // 从全局状态获取用户信息
    const app = getApp();
    const userinfo = app.getuserInfo()
    console.log("userinfo: ", userinfo);
    this.setData({ user: app.getUserInfo() });
  },
  onShow(){
    // 从全局状态获取用户信息
    const app = getApp();
    this.setData({ user: app.globalData.user});
  },
  goToLogin() {
    wx.navigateTo({
      url: '/pages/login/login'
    });
  },
  goToProfile() {
    wx.navigateTo({
      url: '/pages/mine/personalMessage/personal' 
    });
    console.log("11111111111111111111111111111111111")
  }




});